package com.leo.erp.service;

import java.util.List;

import com.leo.erp.dto.OrganizationExecution;
import com.leo.erp.entity.Organization;
import com.leo.erp.util.GlobalRuntimeException;
import com.leo.erp.util.TreeNode;

public interface OrganizationService {
	
	OrganizationExecution batchDeleteOrganizationByIds(String ids);
	
	/**
	 * 更新机构信息
	 * @param organization
	 * @return
	 */
	OrganizationExecution editOrganization(Organization organization);
	
	/**
	 * 查询父级简称
	 * @param orgNo
	 * @return
	 */
	OrganizationExecution findByOrgNo(String orgNo);
	
	/**
	 * 查询机构信息
	 * @param orgId
	 * @return
	 */
	OrganizationExecution findById(int orgId);
	
	/**
	 * 添加机构
	 * @param organization
	 * @return
	 * @throws GlobalRuntimeException
	 */
	OrganizationExecution addOrganization(Organization organization) throws GlobalRuntimeException;
	
	/**
	 * 获取机构树
	 * @param currentId
	 * @param tenantId
	 * @return
	 */
	List<TreeNode> getOrganizationTree(int currentId , int tenantId);
}
